import massage from "./massage.vue";
import Vue from "vue";

const massageConstructor = Vue.extend(massage);
const serve = (massages) => {
  let massageInstance = new massageConstructor();

  massageInstance.$mount(document.createElement("div"));

  document.body.appendChild(massageInstance.$el);
  Vue.nextTick(() => {
    massageInstance.title = massages.title;
    massageInstance.massage = massages.desc;
    massageInstance.visible = true;
  });
  return massageInstance;
};

export default serve;
